<?php
/**
 * 集阅读模块处理程序
 *
 * @author Timfan QQ:1026073477
 * @url http://bbs.we7.cc/
 */
defined('IN_IA') or exit('Access Denied');

class Tim_albumModuleProcessor extends WeModuleProcessor {
	public $table_reply = 'tim_album';
	public function respond() {
		$rid = $this->rule;
		$fromuser = $this->message['from'];
		if (!empty($rid)) {
			$reply = pdo_fetch("SELECT * FROM " . tablename($this->table_reply) . " WHERE rid = :rid", array(':rid' => $rid));
			if($reply) {
					$news = array();
					$news[] = array(
						'title' => $reply['album_name'],
						'description' =>"相册创建于".date("y-m-d",$reply['create_time']),
						'picurl' =>$reply['cover'],
						'url' => $this->createMobileUrl('main', array('album_id' => $reply['album_id'])),
					);
					return $this->respNews($news);
			}
		}
		return null;
	}
}